<%@ page language="java" pageEncoding="GBK"%>
<%@ page import="collector.util.Configuration"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import="java.util.List"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    request.setAttribute("urls", Configuration.getAllPages());
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>test2</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<!--
		<link rel="stylesheet" type="text/css" href="styles.css">
		<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/Power/temp.js"></script>
		-->

	</head>

	<body>
		<form id="form" action="collector.jsp" target="target">
			<select name="url" onchange="form.submit();">
				<option></option>
				<c:forEach var="url" items="${urls}">
					<option value="${url}">${url}</option>
				</c:forEach>
			</select>
		</form>
		<iframe name="target" width="100%" height="500px" style="display: none;"></iframe>
        <input type="button" onclick="doOpen();" />
        <input type="button" onclick="window.location.reload()" />
        <input type="button" onclick="window.showModalDialog('./test.jsp', null, 'dialogWidth=500px; dialogHeight=500px; status=0;');" />
        
        <iframe id="iframe" src="./test.jsp" frameborder="0" scrolling="no"
            style="border: 1px solid red; width: 700px; height: 100px;"></iframe>
        
	</body>

<script type="text/javascript">
<!--
if (window.dialogArguments) {
    alert(window.dialogArguments.a);
}
window.returnValue = {a: 2, b: 3};
function openModalDialog2(params) {
    var url = params.url;
    var w = params.width;
    var h = params.height;
    var object = params.object;
    var fs = "dialogWidth=" + w + "px; dialogHeight=" + h + "px; helper=0; status=0; scroll=0";
    return window.showModalDialog(url, object, fs);
}

function doOpen() {
    var o = openModalDialog2({url: 'index2.jsp', width: 600, height: 200, object: {a: 1}});
    alert(o.a + "--" + o.b);
}


//-->
</script>
</html>
